/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.paris5.master2.guitarmaster.bean;

/**
 *
 * @author mourad
 */
public class EcomCategory implements EcomBean {
    
    private Integer idCategory;
    private String title;
    private String description;
    private EcomCategory parent;

    public String getDescription() {
        return description;
    }

    public Integer getIdCategory() {
        return idCategory;
    }

    public EcomCategory getParent() {
        return parent;
    }

    public String getTitle() {
        return title;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public void setIdCategory(Integer idCategory) {
        this.idCategory = idCategory;
    }

    public void setParent(EcomCategory parent) {
        this.parent = parent;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final EcomCategory other = (EcomCategory) obj;
        if (this.idCategory != other.idCategory && (this.idCategory == null || !this.idCategory.equals(other.idCategory))) {
            return false;
        }
        if ((this.title == null) ? (other.title != null) : !this.title.equals(other.title)) {
            return false;
        }
        if ((this.description == null) ? (other.description != null) : !this.description.equals(other.description)) {
            return false;
        }
        if (this.parent != other.parent && (this.parent == null || !this.parent.equals(other.parent))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return this.title==null? "":this.title;
    }
}
